﻿package hunterCommonlib.display.animation 
{
	import flash.display.Bitmap;
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	/**
	 * ...
	 * @author ...
	 */
	public class AnimationContent extends Sprite
	{
		static public const BITMAP:uint = 1;
		static public const MOVIECLIP:uint = 2;
		private var _content:DisplayObject
		private var _totalFrames:uint;
		private var _type:uint = 0;
		private var _error:Error
		public function AnimationContent(displayObject:DisplayObject=null,col:uint=1,row:uint=1) 
		{
			_content = displayObject
			try{
				if (displayObject as Bitmap) {
					_type = BITMAP;
					initBitmap(displayObject,col,row);
				}else if(displayObject as MovieClip) {
					_type = MOVIECLIP;
				}else if (displayObject == null) {
				}
				else {
					_error=new Error("参数displayObject不是所需要的类型，应为movieclip或者bitmap")
					throw(_error);
				}
			}catch (error:Error) {
				throw(_error);
			}
		}
		public function get type():uint {
			return _type
		}
		private function initBitmap(bmp:Bitmap, u_col:uint, u_row:uint):void {
			if (_content != bmp) {
				_content = bmp;
			}
			
		}
		public function gotoAndPlay(frame:uint):void {
			_conte
		}
		public function gotoAndStop(frame:uint):void {
			
		}
		private function renderFrame(frame:uint):void {
		}
	}
	
}